home *** CD-ROM | disk | FTP | other *** search
- /* fxPAINT API functions
- ©1999 by Felix Schwarz / Innovative
- All rights reserved.
- */
-
- #ifndef _fxplugin_c
- #define _fxplugin_c 1
-
- /* Define functions locally
- This macro IS the most important of the whole library. Don`t modify it,
- AND: Don`t use Alloc#? or Free#? of exec.library for memory-allocation
- for space used by fxPAINT!! This is due to the fact, that fxPAINT
- supports the PPC. Please use CstAllocVec and CstFreeVec instead! To
- avoid any problems, try to always use CstAllocVec and CstFreeVec.
-
- How to use this macro with seperate functions:
- · Pass a pointer to the PluginInit-Structure to your function
- · Call this macro INSIDE the function
-
- For Hooks
- · Define a global variable (not recommended, as the plugin can be
- used by more than one program (e.g. several started fxPAINTs) or
- expunged (loss or modification of global variable -> crash!).
-
- If your plugin is designed to be only used by one task, simply don`t
- let your plugin be opened more than one time (watch the LibCnt) and
- take care, that the LibCnt can`t be expunged, if you define a hook!
- (else: Crash!)
-
- · You might want to use a special construction with ports and the
- pointer to the struct attached to it.
-
- */
-
- #define initfunc(plg) struct PluginInit *fxPLUGIN_init=(plg);\
- struct Gadget * (* gui_crflexgad) (struct Gadget **glistptr, long winid, long x, long y, long border, long wid, ... ) = fxPLUGIN_init->gui_crflexgad;\
- struct Window * (* gui_openfix) (char *title, ULONG idcmp, long id, long x, long y, long addwid, long addhei) = fxPLUGIN_init->gui_openfix;\
- void (* gui_drboxsel) (long id, long x, long y, long w, long h) = fxPLUGIN_init->gui_drboxsel;\
- BOOL (* fxp_drawfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos) = fxPLUGIN_init->fxp_drawfsb;\
- BOOL (* fxp_drawscaledfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos, long wid, long hei) = fxPLUGIN_init->fxp_drawscaledfsb;\
- BOOL (* fxp_drawfitfsb) (struct Window *win, struct Screen *scr, struct fsbitmap *fsb, long xpos, long ypos, long wid, long hei) = fxPLUGIN_init->fxp_drawfitfsb;\
- ULONG (* fxpaint_api) (long mode, ULONG attr, ULONG value, ULONG value2, ULONG value3, ULONG value4) = fxPLUGIN_init->fxpaint_api\
-
- #endif
-